<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			//检测用户是否登录
			var info = uni.getStorageSync("userinfo");
			if (info.username == '' || typeof(info.username) == 'undefined' || info.token == '' || typeof(info.token) ==
				'undefined') {
				return;
			}else{
				uni.reLaunch({
					url: "/pages/index/index"
				})
			}
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import url("./common/uni.css");
</style>
